import linecache
import os
import numpy as np
import argparse

def parse_args():
    parser = argparse.ArgumentParser()
    parser.add_argument('--input', type=str, 
                        default="/home/xiaoyf/data/HG002/R10.4/20221109_1654_5D_PAG68757_39c39833/train1/21mer/samples_CG.hc_poses.30m.train.21mer.tsv",
                        help='the input filepath')
    parser.add_argument(
        "--output",
        type=str,
        default="/home/xiaoyf/data/HG002/R10.4/20221109_1654_5D_PAG68757_39c39833/train1/21mer/samples_CG.hc_poses.30m.train.21mer.noprob.tsv",
        help="trainset output address.",
    )
    return parser.parse_args()

def parse_data(args):
    fh = open(args.output, "w", buffering=512)
    with open(args.input, "r") as f:
        for line in f:
            words = line.strip().split()
            row=words[0:10]+words[11:]
            fh.write('\t'.join(row) + '\n')

if __name__ == '__main__':
    args=parse_args()
    parse_data(args)